-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log4j simplifications #7651
Log4j simplifications #7651
Conversation
See [1]. [1]: https://github.com/apache/logging-log4j-kotlin/releases/tag/rel%2F1.3.0 Signed-off-by: Sebastian Schuberth <[email protected]>
1598914
to
89aeb50
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #7651 +/- ##
============================================
- Coverage 68.03% 68.02% -0.02%
Complexity 2023 2023
============================================
Files 344 344
Lines 16727 16733 +6
Branches 2372 2371 -1
============================================
+ Hits 11381 11383 +2
- Misses 4363 4367 +4
Partials 983 983
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
89aeb50
to
0c8f6a1
Compare
Use the new Log4j Kotlin API extension property to avoid the logger to leak into the public API via (public) companion objects. Also, find a better way to log from top-level functions by using `MethodHandles.lookup()` (introduced in JDK 7) to get the name of the Kotlin-internal class that is generated to hold top-level functions. SLF4J describes this as an idiomatic way to get a logger, see [1]. [1]: https://www.slf4j.org/faq.html#declaration_pattern Signed-off-by: Sebastian Schuberth <[email protected]>
Signed-off-by: Sebastian Schuberth <[email protected]>
Signed-off-by: Sebastian Schuberth <[email protected]>
0c8f6a1
to
e5c1e88
Compare
`OkHttpClientHelper` should go first as the file is named after it. Signed-off-by: Sebastian Schuberth <[email protected]>
e5c1e88
to
e40b8ed
Compare
IMO this is a breaking change: since |
Yes, right. For the PRs / version bumping it's too late, but I'll at least label this PR accordingly. |
@sschuberth: Before this PR, the loggers were throwing exception if the calling classes were not in Now, they cannot use ORT classes' loggers but it should not be a problem since the aforementioned exception is not thrown anymore. Right ? |
I don't believe that's true. That code was already removed way back in 606da3a. However, I acknowledge that this PR reintroduces a behavior that 606da3a circumvented, which is to "Stop polluting
The exception is not thrown anymore in any case. |
Understood thanks ! |
Please have a look at the individual commit messages for the details.